﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MySpace.Data;
/// <summary>
/// MemberTable 的摘要说明
/// </summary>
namespace DataBaseTable
{
    public class MemberTable : DBTable
    {
        private const string tableName = "member";
        public MemberTable()
            : base(GetHandler.Init(), tableName)
        {
            this.GetRow();
            //没有参数重载
        }
        public MemberTable(int Newid)
            : base(GetHandler.Init(), tableName)
        {
            this.Filter = "id=?";
            this.AddParameter("id", Newid);
            this.GetRow();
            //没有参数重载
        }

        /// <summary>
        /// ID
        /// </summary>
        public int ID
        {
            get
            {
                try { return (int)this.DataRow["id"]; }
                catch { return 0; }
            }
        }

        /// <summary>
        /// 姓名
        /// </summary>
        public string Name
        {
            get
            {
                try { return (string)this.DataRow["name"]; }
                catch { return string.Empty; }
            }
            set
            {
                this.DataRow["name"] = value;
            }
        }

        /// <summary>
        /// 学号
        /// </summary>
        public string StuID
        {
            get
            {
                try { return (string)this.DataRow["stuid"]; }
                catch { return string.Empty; }
            }
            set
            {
                this.DataRow["stuid"] = value;
            }
        }

        /// <summary>
        /// 职务
        /// </summary>
        public string ZhiWu
        {
            get
            {
                try { return (string)this.DataRow["zhiwu"]; }
                catch { return string.Empty; }
            }
            set
            {
                this.DataRow["zhiwu"] = value;
            }
        }



        /// <summary>
        /// 电话
        /// </summary>
        public string Phone
        {
            get
            {
                try { return (string)this.DataRow["phone"]; }
                catch { return string.Empty; }
            }
            set
            {
                this.DataRow["phone"] = value;
            }
        }

        /// <summary>
        /// 短号
        /// </summary>
        public string Short
        {
            get
            {
                try { return (string)this.DataRow["short"]; }
                catch { return string.Empty; }
            }
            set
            {
                this.DataRow["short"] = value;
            }
        }

        /// <summary>
        /// 宿舍地址
        /// </summary>
        public string Address
        {
            get
            {
                try { return (string)this.DataRow["address"]; }
                catch { return string.Empty; }
            }
            set
            {
                this.DataRow["address"] = value;
            }
        }


        /// <summary>
        /// 班级
        /// </summary>
        public string M_Class
        {
            get
            {
                try { return (string)this.DataRow["m_class"]; }
                catch { return string.Empty; }
            }
            set
            {
                this.DataRow["m_class"] = value;
            }
        }

        /// <summary>
        ///类型: 干部0/干事1/社员2
        /// </summary>
        public int M_Type
        {
            get
            {
                try { return (int)this.DataRow["m_type"]; }
                catch { return 0; }
            }
            set
            {
                this.DataRow["m_type"] = value;
            }
        }
        /// <summary>
        /// 入学年份
        /// </summary>
        public string M_RX_Year
        {
            get
            {
                try { return (string)this.DataRow["m_rx_year"]; }
                catch { return string.Empty; }
            }
            set
            {
                this.DataRow["m_rx_year"] = value;
            }
        }

        /// <summary>
        /// 入职年份
        /// </summary>
        public string M_RZ_Year
        {
            get
            {
                try { return (string)this.DataRow["m_rz_year"]; }
                catch { return string.Empty; }
            }
            set
            {
                this.DataRow["m_rz_year"] = value;
            }
        }


    }
}